<%@ page import="use.User" %><%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2024/10/10
  Time: 21:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<% String loginError = (String)request.getAttribute("loginError");
    String registerSuccess = (String)request.getAttribute("registerSuccess");
    String info = (String)request.getAttribute("Info");
    User user = new User();
    session.setAttribute("ifLogin", user.getIfLogin());
    session.setAttribute("user", user);
%>

<html>
<head>
    <title>Title</title>
</head>
<body>
<% if(loginError != null) { %>
<h3><% out.println(loginError); %></h3>
<% } %>
<% if(registerSuccess != null) { %>
<h3><% out.println(registerSuccess); %></h3>
<% } %>
<% if(info != null) { %>
<h3><% out.println(info); %></h3>
<% } %>

<form action="loginServlet" method="post">
    用户名：<input type="text" name="username"> <br>
    密&ensp;&ensp;码：<input type="password" name="password"> <br>
    <input type="submit" value="登录"> <br>
    没有账号，<a href="register.jsp">点击注册</a>
</form>
</body>
</html>
